home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutord.EXE
/
AUTOCAST.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-16
|
438b
|
22 lines
/* autocast.c */
main()
{
int a=1000; float b= -100.5; char c=100;
a = b;
printf("a is %d\n",a); /* prints: a is -100 */
a = 1000; /* re-establish the value for a */
b = a;
printf("b is %f\n",b);/* prints: b is 1000.000000 */
b = -100.5; /* re-establish the value for b */
c = b;
printf("c is %d\n",c); /* prints: c is -100 */
c = 100;
b = c;
printf("b is %f\n",b); /* prints: b is 100.000000 */
}